/*
 * @Author: Leo l024983409@qq.com
 * @Date: 2023-11-11 19:12:04
 * @LastEditors: Leo l024983409@qq.com
 * @LastEditTime: 2023-11-14 18:30:59
 * @FilePath: \cms\src\modules\auth\dtos\login-account.dto.ts
 * @Description:
 */
import { ApiProperty } from "@nestjs/swagger";
import { IsEmail, IsNotEmpty } from "class-validator";

export class LoginEmailDto {

  @ApiProperty({ name: '邮箱', example: '123@qq.com' })
  @IsNotEmpty({ message: '邮箱不能为空' })
  @IsEmail({}, { message: '邮箱格式不正确' })
  email: string;

  @ApiProperty({ description: "验证码", type: String })
  @IsNotEmpty({ message: "验证码不能为空" })
  code: string;
}
